<?php

use Illuminate\Database\Seeder;
use App\Models\User;

class UserSeader extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        User::truncate();

        //添加模拟数据 100个用户
        factory(User::class, 100)->create();

        //规定id=1用户为admin
        User::where('id', 1)->update(['username'=>'admin']);
    }
}
